<include file='Admin/Tpl/Public/nav.html' />
<style>.tr:nth-of-type(even){background:#D8F6FF;}</style>
<div class="page-content">
    <div class="container-fluid">
    	<br/>
        <ol class="breadcrumb default square rsaquo sm">
            <li><a href="index.html"><i class="fa fa-home"></i></a></li>
            <li><a href="#fakelink">Team In</a></li>
            <li><a href="__URL__/index">百宝箱管理</a></li>
            <li class="active">添加信息</li>
        </ol>
        <div class="the-box full no-border">
            <div class="table-responsive">
                <div class="the-box">
            		<form id="ExampleBootstrapValidationForm" method="post" action="__URL__/to_add_information" enctype="multipart/form-data">
                    	<fieldset>
                            <div class="form-group">
                                <label>标题</label>
                                <input type="text" class="form-control must" name="information_title"/>
                            </div>
                            
                            <div class="form-group">
                                <label>副标题</label>
                                <input type="text" class="form-control must" name="information_subtitle"/>
                            </div>
                            
                            <div class="form-group">
                                <label>详细信息</label>
                                <input type="text" class="form-control must" name="information_desc"/>
                            </div>

                            <div class="form-group">
                                <label>频道</label>
                                <select class="form-control" tabindex="2" name="information_channel" id="select">
                                    <foreach name="rs" item="value">
                                        <option value="{$value.channel_id}">{$value.channel_name}</option>
                                    </foreach>                                                      
                                </select>
                            </div>

                            <!-- <div class="form-group">
                                <label>封面图片</label>
                                <input type="file" class="form-control must" name="information_image"/>
                            </div> -->

                            <div class="form-group">
                                <label><input type="radio" name="information_url_type" value="1" checked="checked">本地上传</label>
                                <label><input type="radio" name="information_url_type" value="2">网络上传</label>
                                <label>(允许上传格式:mp4,pdf,txt,mp3,docx,doc,jpeg,jpg,png,gif,xls,xlsx)</label>
                                <input type="file" class="form-control " name="information_url_upload" />
                                <input type="url"  class="form-control " name="information_url_editor" style="display:none">
                            </div>
                            
                            <div class="form-group">
                                <input class="btn btn-primary" id="submit" type="submit" value="提交" />
                            </div>
                        </fieldset>
                	</form>
                </div>
            </div>
        </div>
<div id="main-content" style="margin:10px; padding:10px; background:none">
	<div class="content-box">
        
	</div>
	<div class="clear"></div>
</div>
</body>
</html>
<script type="text/javascript">
$("body").css("background","none");
$("#body-wrapper").css("background","none");
$("input[name='information_url_type']").change(function(){
    var v = $(this).val();
    switch(v){
        case '1':
            $("input[name='information_url_upload']").css('display','block');
            $("input[name='information_url_editor']").css('display','none');
            break;
        case '2':
            $("input[name='information_url_editor']").css('display','block');
            $("input[name='information_url_upload']").css('display','none');
            break;
    }
})
</script>